﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SurveyItemOption.aspx.cs" Inherits="CRM.Web.SurveyManage.SurveyItemOption" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title></title>
    <link href="<%= base.ResourcesPath + "Style/main.css" %>" rel="stylesheet" type="text/css" />
    <link href="<%= base.ResourcesPath + "Style/button.css" %>" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/jquery-1.6.2.min.js" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/My97DatePicker/WdatePicker.js"  defer="defer" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/MaskTextBox.js" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/button.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    
<table border="0" cellpadding="0" cellspacing="0" id="tTitle">
    <tr>
	<td class="left">
	    <img src="<%= base.ResourcesPath %>Images/title_left.gif" alt="" />
	</td>
	<td class="middle">

    <div class="pagetitle" style="width: 100%">
        <div><asp:Label ID="lblTitle" runat="server" Text="问卷题目选项编辑" ></asp:Label></div>
    </div>
	
	</td>
	<td class="right">
	    <img src="<%= base.ResourcesPath %>Images/title_right.gif" alt="" />
	</td>
    </tr>
</table>
<div id="divMain" >
    <div style="width: 100%">
	<table border="0" cellpadding="0" cellspacing="0" class="table" >
	    <tr>
	        <td style="vertical-align:top; width:50%">
	        <table border="0" cellpadding="0" cellspacing="0" class="table">
	            <tr style="display:none">
                    <td class="title">
                        自增编号:
                    </td>
                    <td class="content">
                        <asp:TextBox ID="txtAUTOID" runat="server" CssClass="txt" MaxLength="20" Rows="3" TextMode="SingleLine" Enabled="false"></asp:TextBox>
                    </td>
                </tr>	            
                <tr>
                    <td class="title">
                        选项编号:
                    </td>
                    <td class="content">
                        <asp:TextBox ID="txtOPTION_ID" runat="server" CssClass="txt" MaxLength="20" Rows="3" TextMode="SingleLine" Enabled="false"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="title">
                        选项名称:
                    </td>
                    <td class="content">
                        <asp:TextBox ID="txtOPTION_NAME" runat="server" CssClass="txt txt90" MaxLength="20" Rows="3" TextMode="SingleLine" ></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="title">
                        所属问卷编号:
                    </td>
                    <td class="content">
                        <asp:TextBox ID="txtSURVEY_ID" runat="server" CssClass="txt" MaxLength="20" Rows="3" TextMode="SingleLine" Enabled="false"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="title">
                        所属问卷名称:
                    </td>
                    <td class="content">
                        <asp:TextBox ID="txtSURVEY_NAME" runat="server" CssClass="txt txt90" MaxLength="20" Rows="3" TextMode="SingleLine" Enabled="false"></asp:TextBox>
                    </td>
                </tr
                
                <tr>
                    <td class="title">
                        所属题目编号:
                    </td>
                    <td class="content">
                        <asp:TextBox ID="txtITEM_ID" runat="server" CssClass="txt" MaxLength="20" Rows="3" TextMode="SingleLine" Enabled="false"></asp:TextBox>
                    </td>
                </tr> 
                <tr>
                    <td class="title">
                        所属题目名称:
                    </td>
                    <td class="content">
                        <asp:TextBox ID="txtITEM_NAME" runat="server" CssClass="txt" MaxLength="20" Rows="3" TextMode="SingleLine" Enabled="false"></asp:TextBox>
                    </td>
                </tr> 
                <tr>
                    <td class="title">
                        下一题:
                    </td>
                    <td class="content">
                        <asp:DropDownList ID="ddlNEXT_ITEM" runat="server" CssClass="ddl ddl90" ></asp:DropDownList>
                    </td>
                </tr>             
            </table>
            <div style="width: 100%;">
                <div class="btndiv">
                    <span class="btnspan">
                        <asp:Button ID="btnAdd" runat="server" Text="新添" CommandName="Add" CssClass="btn title_qd"
                            OnClick="btnAdd_Click" /></span>&nbsp;
                    <span class="btnspan"><asp:Button ID="btnOK" runat="server" Text="保存" CommandName="Save" CssClass="btn title_qd"
                            OnClick="btnOK_Click" /></span>&nbsp;
                     <input id="btnCancel" runat="server" type="button" value="返回" class="btn title_fh" />
                </div>
            </div>
            </td>
            <td style="vertical-align:top; width:50%">
            <table border="0" cellpadding="0" cellspacing="0" class="table">
                <tr>
                    <td>
                    <dp:WebGridView ID="gvList" runat="server" CssClass="gridview" AutoGenerateColumns="False" OnRowCreated="gvList_RowCreated" OnRowDataBound="gvList_RowDataBound" OnRowDeleting="gvList_RowDeleting" AllowPaging="true" 
                    AllowSorting="true" PageSize="10"  SortExpressionValue="AUTOID">
                    <Columns>
                    <asp:BoundField DataField="AUTOID" HeaderText="自增编号"  SortExpression="AUTOID" Visible="false"/>
			        <asp:BoundField DataField="OPTION_ID" HeaderText="选项编号"  SortExpression="OPTION_ID" />
			        <asp:BoundField DataField="ITEM_ID" HeaderText="题目编号"  SortExpression="ITEM_ID" />
			        <asp:BoundField DataField="SURVEY_ID" HeaderText="问卷编号"  SortExpression="SURVEY_ID" />
			        <asp:BoundField DataField="OPTION_NAME" HeaderText="选项名称"  SortExpression="OPTION_NAME"/>
			        <asp:BoundField DataField="NEXT_ITEM" HeaderText="下一题"  SortExpression="NEXT_ITEM" />
			        <asp:TemplateField HeaderText="操作" ShowHeader="False">
                        <itemtemplate>
                        <div style="white-space: nowrap;">
                            <asp:HyperLink id="hlModify" runat="server" NavigateUrl='<%# String.Format(ModifyUrl,Eval("AUTOID").ToString(),Eval("SURVEY_ID").ToString(),Eval("ITEM_ID").ToString()) %>'>详细</asp:HyperLink>
                            <asp:LinkButton id="lbtnDelete" runat="server" Text="删除" CommandName="Delete" CausesValidation="False" OnClientClick="return confirm('您确认要删除此条记录吗？');"></asp:LinkButton>            
                        </div>
				        </itemtemplate>
                        <headerstyle width="90px" />
                    </asp:TemplateField>
                    </Columns>	
                    <RowStyle CssClass="row" />
                    <AlternatingRowStyle CssClass="row2" />
                    <HeaderStyle CssClass="header" />	
                    <PagerStyle CssClass="pager" />	
                    </dp:WebGridView>
                </td>
                </tr>
            </table>
            </td>
        </tr>
	</table>
	</div>
	</div>
    </form>
</body>
</html>
